package com.example.makerspace.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.makerspace.domain.StageFormDO;
import com.example.makerspace.mapper.StageFormMapper;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;

@Component
public class StageFormDAO  extends  BaseDAO<StageFormDO>{
    @Resource
    private StageFormMapper stageFormMapper;

    @PostConstruct
    public void init(){
        this.mapper = stageFormMapper;
    }

    public List<StageFormDO> selectByUserName(String username) {
        QueryWrapper<StageFormDO> wrapper = new QueryWrapper<>();
        wrapper.eq("username",username);
        return  mapper.selectList(wrapper);
    }
}
